﻿/*
[ /filesystem/filesystem.js, /apps/tk.yunos.system/desktop/js/desktop.js, 
 /apps/tk.yunos.system/windows-manager/js/windowmgr.js ]
*/

/*
文件头的注释块\/*[]*\/中[]中是本js依赖的其他文件
*/

Ext.namespace("tk","tk.yunos","tk.yunos.system");

//准备prepareSystem
(tk.yunos.system.prepareSystem = function(onReady){
	//加载文件系统配置
	tk.yunos.filesystem.loadConfigs(onReady);
})(function(){
	//全局桌面，整个系统只能有一个桌面
	tk.yunos.system.GLOBAL_DESKTOP = new tk.yunos.system.Desktop();
	//全局窗口管理器，整个系统只能有一个窗口管理器
	tk.yunos.system.GLOBAL_WINDOWMGR = new tk.yunos.system.WindowMgr({
		desktop: tk.yunos.system.GLOBAL_DESKTOP
	});
	var onExtReady = function(){
		new Ext.Viewport({
			layout: 'fit',
			items: [tk.yunos.system.GLOBAL_DESKTOP]
		});
	};
	if(Ext.isReady){
		onExtReady();
	}else{
		Ext.onReady(onExtReady);
	}
});

tk.yunos.system.wait = function(){
	document.body.style.cursor = 'wait';
};

tk.yunos.system.finish = function(){
	document.body.style.cursor = 'auto';
};